<?php
	//获得栏目内容的位置；
	function getarcurl($rows){
		if(!$rows) return false;
		$search = array('{htmldir}','{y}','{m}','{d}','{nid}',);
		foreach($rows as $k => $v){
			if($v['isarchtml']){
				$date = getdate($v['addtime']);
				$replace = array(
					$v['htmldir'],
					$date['year'],
					$date['mon'],
					$date['mday'],
					$v['id'],
				);
				$rows[$k]['html_file'] = C("htmldir").'/'.str_ireplace($search,$replace,$v['archtml']);
				$rows[$k]['url'] = __ROOT__.'/'.$rows[$k]['html_file'];

			}else{
				$rows[$k]['url'] = __ROOT__.'/index.php/index/arc/id/'.$v["id"];
			}
		}
		return $rows;
	}
	//获得栏目列表的位置；
	function getlisturl($row){
		foreach($row as $k=>$v){
			$row[$k]['html_file']=C("htmldir").'/'.$v['htmldir'].'/index.html';
			$row[$k]['url']=__ROOT__.'/'.C("htmldir").'/'.$v['htmldir'].'/index.html';
		}
		return $row;
	}
?>